title = "搜索结果页模板"
url = "/search/:keyword/"
layout = "default"
==
{% set products = catalog.search(this.param.keyword) %}
{% put page_title %}検索結果： {{ this.param.keyword }}{% endput %}
{% put pageurl %}{{ 'catalog/search'|page({keyword: this.param.keyword}) }} - {% endput %}
{% put fb_standard_event %}
fbq('track', 'Search', {
search_string: 'leather sandals'
});
{% endput %}
{% put nextprePageUrl %}
{% if products.nextPageUrl %}
<link rel="next" href="{{ products.nextPageUrl }}">
{% endif %}
{% endput %}
{% put meta_keywords %}{{ this.param.keyword }},{{ category.meta_keywords }}{% endput %}
{% put meta_description %}検索結果：{{ this.param.keyword }}. {{ category.meta_description }}{% endput %}


<div class="category_content">
    <!-- breadcrumbs -->
    {% partial 'common/breadCrumb' pages = {'検索結果：': '', (this.param.keyword): '' } %}
    <!-- breadcrumbs end -->
    <div class="categoryCont">
        <div class="container">
            {% partial 'catalog/category-sidebar' products=products %}
            <div class="fr rightBox">
                <div class="catg_rightBoxTop boxSizing">
                    <div class="fl">
                        <button class="fiveShow" dataClass="fiveShow"><i class="fa fa-th"></i></button>
                        <button class="threeShow active" dataClass="threeShow"><i class="fa fa-th-large"></i></button>
                    </div>

                </div>


                <div class="catg_productBox">
                    <ul class="catg_product ">
                        {% for product in products.data %}
                        <li class="catgItem">
                            <a href="{{ product.url }}" title="{{ product.name }}">
                                <div class="catgItem_icon"><img src="{{ 'assets/img/new.png'|theme }}" alt=""></div>
                                <div class="catgItem_image">
                                    <img  class="lazy" data-original="{{ product.f_thumb }}" alt="{{ product.name }}" width="100%">
                                </div>
                                <div class="catgItem_data">
                                    <p class="omit"></p>
                                    <p class="omit">{{ product.name }}</p>
                                    <p class="omit">{{ product.price|formatPrice }} 税込</p>
                                </div>
                            </a>

                        </li>
                        {% endfor %}
                    </ul>
                </div>
                <div class="catg_rightBoxTop boxSizing">
                    {% partial 'catalog/category-paging' %}
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">
    {% if products.data  %}
    {% for key, product in products.data %}
    var google_tag_params = {
        ecomm_prodid: "{{product.id}}",
        ecomm_pagetype: "searchresults",
        ecomm_totalvalue: {{product.price|ratePrice}}
    };
    {% endfor %}
    {% else %}
    var google_tag_params = {
        ecomm_prodid: "",
        ecomm_pagetype: "searchresults",
        ecomm_totalvalue:
    };
    {% endif %}
</script>